package com.lyf.design.learn.designmodel.builder;

/**
 * @AUTHOR LYF
 * @DATE 2022/6/2
 * @VERSION 1.0
 * @DESC
 */
public class PersonBuilder implements Builder<Person>{
    Person person=new Person();

    PersonBuilder buildBasicInfo(String name,Integer age){
        person.setName(name);
        person.setAge(age);
        return this;
    }

    PersonBuilder buildScore(Integer score){
        person.setScore(score);
        return this;
    }

    @Override
    public Person build() {
        return person;
    }
}
